Skip to content

docs(tutorials): attach to an existing ROS 2 stack#453

Merged
mfaferek93 merged 2 commits into
mainfrom
docs/448-attach-existing-stack
Jun 21, 2026
Merged

docs(tutorials): attach to an existing ROS 2 stack#453
mfaferek93 merged 2 commits into
mainfrom
docs/448-attach-existing-stack

Conversation

@mfaferek93

Copy link
Copy Markdown
Collaborator

Adds tutorials/attach-existing-stack.rst for the common case of pointing the gateway at a stack you did not launch (Nav2, MoveIt, Autoware).

Covers: the apt/same-environment short path; the four things that must match for cross-process ROS 2 (distro, RMW, ROS_DOMAIN_ID, discovery reachability); running the gateway against a live graph with runtime discovery; containers (--network host / shared netns, CycloneDDS opt-in, socket-buffer note); web UI CORS; and a troubleshooting table. Wired into the tutorials toctree.

Closes #448

How to point the gateway at a running stack you did not launch: matching
RMW / domain / distro, discovery reachability, containers, web UI CORS,
and a troubleshooting table.

Closes #448
Copilot AI review requested due to automatic review settings June 20, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Sphinx tutorial describing how to run the ros2_medkit gateway against an already-running ROS 2 system (e.g., Nav2/MoveIt/Autoware), with emphasis on matching ROS 2 environment details and handling containers/Web UI integration.

Changes:

  • Adds docs/tutorials/attach-existing-stack.rst covering cross-process ROS 2 prerequisites, runtime discovery usage, container networking, Web UI/CORS, and troubleshooting.
  • Wires the new tutorial into docs/tutorials/index.rst (toctree + “Advanced Tutorials” list).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
docs/tutorials/index.rst Adds the new tutorial to the tutorials toctree and advanced tutorial list.
docs/tutorials/attach-existing-stack.rst New end-to-end guide for attaching the gateway to an existing ROS 2 stack, including container + Web UI notes.

Comment thread docs/tutorials/attach-existing-stack.rst Outdated
Comment thread docs/tutorials/attach-existing-stack.rst Outdated
Comment thread docs/tutorials/attach-existing-stack.rst Outdated
Comment thread docs/tutorials/attach-existing-stack.rst Outdated
Comment thread docs/tutorials/attach-existing-stack.rst Outdated
@mfaferek93 mfaferek93 self-assigned this Jun 20, 2026
bburda
bburda previously approved these changes Jun 20, 2026

@bburda bburda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Two things to handle before merge:

  • The open Copilot comments are valid: use the per-distro image tag (ros2_medkit-:latest) on the docker run/pull examples, and the "bundles CycloneDDS" and "enables a permissive CORS default" lines only hold once the image and Docker params changes land, so this should merge after them.
  • The Copilot comment on the faults curl is a false positive: the endpoint emits x-medkit.count, not total_count (the DTO field is count and the integration test asserts count). Leave the doc as written.

The commands, endpoints, config keys and cross-references otherwise check out against the code.

- RMW wording: do not imply the stock image already bundles CycloneDDS;
  say the selected RMW must be installed.
- Container examples: drop the no-op -p with --network host, use the
  distro-specific image tag, add ROS_DOMAIN_ID to both.
- Web UI: point to setting cors.allowed_origins rather than asserting a
  permissive image default.
- Verify: use .items | length for the faults count.
@mfaferek93

Copy link
Copy Markdown
Collaborator Author

Thanks - both points handled:

  1. Image tag + ordering: examples now use ros2_medkit-jazzy:latest, and I reworded the RMW and CORS lines so they no longer claim the stock image bundles CycloneDDS or a permissive CORS default - they're now true independent of merge order (they just say the selected RMW must be installed and to set cors.allowed_origins).

  2. Faults curl: you're right that the field is x-medkit.count (not total_count), so Copilot's rationale was a false positive. I changed the example to jq '.items | length', which counts the returned fault items and avoids the field-name question entirely. Happy to switch it back to ."x-medkit".count if you'd rather keep the server's own counter.

@mfaferek93 mfaferek93 merged commit 63fbd8c into main Jun 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: attach medkit to an existing ROS 2 stack

3 participants